package cn.desk.faq.entity;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.ManyToOne;

import cn.desk.commons.entity.BaseEntity;

@Entity(name = "t_faq")
public class Faq extends BaseEntity {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	private String id;
	@ManyToOne
	private Faq parent;
	private String status;
	private String title;
//	@ManyToOne
//	private Set<Faq> subFaqs;

	@Override
	public Object getValue() {
		return getId();
	}

	@Override
	public String getDisplayName() {
		return "FAQ";
	}

	public Faq getParent() {
		return parent;
	}

	public void setParent(Faq parent) {
		this.parent = parent;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

//	public Set<Faq> getSubFaqs() {
//		if (subFaqs == null) {
//			subFaqs = new HashSet<Faq>();
//		}
//		return subFaqs;
//	}
//
//	public void setSubFaqs(Set<Faq> subFaqs) {
//		this.subFaqs = subFaqs;
//	}

}
